BatchConvert: persist settings when window is closed via X/Escape#12071
Merged
Conversation
The target format and function options were only saved by the Done and Convert buttons. Closing the window any other way lost them - especially in /batchconvertui mode, where the batch window is the main window and nothing else flushes settings to disk on exit (in the embedded flow the main window's close handler masked this). Fixes #11699 Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes #11699.
The batch convert window's
SaveSettings()(target format, active functions, and all function-panel options) was only invoked from the Done and Convert buttons. Closing the window via the X button or Escape ranOnClosing, which only records the window position in memory.In the embedded flow this was masked, because the main window's close handler flushes settings to disk later. But with
/batchconvertui, the batch convert window is the main window and the app exits without any flush — so the selected target format (and any option changes) were lost unless the user happened to click Convert or Done in that session. This matches the "sometimes remembered, sometimes not" behavior in the issue.Fix: call
SaveSettings()fromOnClosing, covering both modes.Notes from the analysis:
Se.SaveSettings()on OK.🤖 Generated with Claude Code